//
//  FilesDownManage.h
//  Created by yu on 13-1-21.


#import <Foundation/Foundation.h>
#import "ASIHTTPRequest.h"
#import "ASINetworkQueue.h"
#import "CommonHelper.h"
#import "DownloadDelegate.h"
#import "FileModel.h"
#import <AVFoundation/AVAudioPlayer.h>
@interface FilesDownManage : NSObject<ASIHTTPRequestDelegate,ASIProgressDelegate>
{
    NSInteger type;
    NSInteger  maxcount;
    int count;
}
@property(nonatomic,retain)UIImage *fileImage;
@property int count;
@property(nonatomic,retain)id<DownloadDelegate> VCdelegate;
@property(nonatomic,retain)id<DownloadDelegate> downloadDelegate;
@property(nonatomic,retain)NSString *basepath;
@property(nonatomic,retain)NSString *TargetSubPath;
@property(nonatomic,retain)NSMutableArray *downinglist;
@property(nonatomic,retain)NSMutableArray *filelist;
@property(nonatomic,retain)NSMutableArray *targetPathArray;
@property(nonatomic,retain)FileModel *fileInfo;
@property(nonatomic)BOOL isFistLoadSound;
-(void)clearAllRquests;
-(void)resumeRequest:(ASIHTTPRequest *)request;
-(void)deleteRequest:(ASIHTTPRequest *)request;
-(void)stopRequest:(ASIHTTPRequest *)request;
-(void)downFile:(QuanJing*)quanjing;
-(void)loadTempfiles;
+(FilesDownManage *) sharedFilesDownManage;
+(FilesDownManage *) sharedFilesDownManageWithBasepath:(NSString *)basepath TargetPathArr:(NSArray *)targetpaths;
-(void)beginRequest:(FileModel *)fileInfo isBeginDown:(BOOL)isBeginDown ;
-(void)startLoad;
-(void)restartAllRquests;

@end


